#pragma once

#include "DataHolder.h"
#include <iostream>
#include "Data.h"

using namespace std;

class Variable : public DataHolder {
public:
	
	virtual ~Variable();
	
	static Variable* createVariable(const string& name, Data* initData);
	
	void setData(Data* data); 
	Data* getCopyOfData();
	
	bool getBooleanValue();
	int getIntValue();
	float getFloatValue();
	string getStringValue();
	string getVariableName();
	
	const string& getName() { return m_name; }
	
	void setReferenced(bool value);
	
	static int getNrOfInstances() { return s_nrOfInstances; }
    
private:
	
	Variable(const string& name, Data* initData);
	
	string m_name;
	Data* m_data;
	
	static int s_nrOfInstances;
	
};